# 设置测试源文�?
set(TEST_SRC 
    utf_check_test.cc  
)

# 设置被测试的源代码文�?
set(SRC_UTF 
    ${PROJECT_SOURCE_DIR}/utf/src/utf_check.cc
)

# 创建测试可执行文�?
add_executable(utf8_check_tests ${TEST_SRC} ${SRC_UTF})

# 设置输出目录
set_target_properties(utf8_check_tests PROPERTIES
    RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin
)

# 链接Google Test库和线程�?
target_link_libraries(utf8_check_tests
    GTest::gtest_main
    GTest::gtest
    pthread
)

# 自动发现测试用例
include(GoogleTest)
gtest_discover_tests(utf8_check_tests)
